package com.wugh.fast.demo.controller;

import com.wugh.fast.demo.model.UserDO;
import com.wugh.fast.demo.service.UserService;
import com.wugh.fast.module.api.bo.BasePageQueryBO;
import com.wugh.fast.module.api.vo.PageQueryResultVO;
import com.wugh.fast.module.api.vo.ResponseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 说明:
 *
 * @author wugh
 * @date 2019-11-20 16:43
 */
@RestController
@RequestMapping("/api/users")
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping
    public ResponseVO<PageQueryResultVO<UserDO>> query(BasePageQueryBO queryBO) {
        return ResponseVO.ok(userService.selectByQuery(queryBO));
    }
}
